// 返回值
interface Res {
    code: number
    message?: string
}

// 注册的form
export interface RegisterForm {
    name: string
    password: string
}

// 登录
export interface LoginData extends RegisterForm {
    keep?: boolean
}

// 登录返回
export interface LoginRes {
    code: number
    token: string
}

// 注册重复检测返回
export interface CheckUserRes extends Res {
    data?: boolean
}

// 注册
interface RegisterData {
    name: string
}

export interface RegisterRes extends Res {
    data: RegisterData
}

enum GenderOptions {
    '保密' = 0,
    '男' = 1,
    '女' = 2
}


// type Gender<T extends GenderOptions> = T

export interface UploadAvatarRes {
    code: number
    url: string
}

// 用户信息返回
export interface UserInfor {
    id: string
    name?: string
    nickname?: string,
    avatarUrl?: string
    area?: Array<string>, // 地址
    gender?: GenderOptions, // 性别
    birthday?: string, // 生日
    brief?: string // 简介
    follow?: number // 关注
    fans?: number // 粉丝
}
export interface UserInforRes extends Res {
    data: UserInfor
}


